<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="Css/css4.css" rel="stylesheet" type="text/css" />
<title>新增表单元素</title>
</head>

<body>
<form id="frmTmp">
<fieldset>
<legend>请输入职业：</legend>
<input type="text" id="inputtxt" list="lstWork" class="inputtxt"/>
<datalist id="lstWork">
<option value="程序开发员"></option>
<option value="系统架构师"></option>
<option value="数据维护员"></option>
</datalist>
</fieldset>
</form>
<form title="书上提供的方式 无法实现" id="frmTmp">
<fieldset>
<legend>请输入两个数字：</legend>
<input type="text" id="txtNum_1" class="inputtxt" />X
<input type="text" id="txtNum_2" class="inputtxt" />=
<output onFormInput="value=txtNum_1.value*txtNum_2.value">
</output>
</fieldset>
</form>

<form oninput="x.value=parseInt(a.value)+parseInt(b.value)" title="w3school提供">0
   <input type="range" id="a" value="50">100
   +<input type="number" id="b" value="50">
   =<output name="x" for="a b"></output>
</form> 
<form id="frmTmp">
<fieldset>
<legend>请选择密钥位数：</legend>
<keygen name="keyUserInfo" class="inputtxt" />
<input type="submit" name="frmSubmit" class="inputbtn" value="提交" />
</fieldset>
</form>
</body>
</html>
